In recent years, consumer electronic devices such as cell phones, portable media players, tablets, laptops, desktops, televisions, navigation systems, etc. have become ubiquitous. These devices often include an audio jack through which they receive and/or provide audio signals. Generally speaking, an audio jack is configured to receive an audio plug that is connected through electrical wires or cables to a stereo, receiver, speakers, headphones, etc.
Audio plugs can have any number of ring-shaped contacts, terminals, or poles along their lengths. A common type of audio plug is the TRS type, with “Tip,” “Ring,” and “Sleeve” terminals, in that order. Traditional TRS-type plugs carry the left channel (tip), right channel (ring), and ground (sleeve).
Another common type of audio plug is the TRRS type, with “Tip,” “first Ring,” “second Ring,” and “Sleeve” terminals, which may have different configurations: standard or Open Mobile Terminal Platform (OMTP). Contacts for a standard plug include the left channel (tip), right channel (first ring), ground (second ring), and microphone (sleeve). In an OMTP plug, the tip and first ring terminals also carry the left and right channels, respectively, but the second ring is a microphone contact and the sleeve terminal has the ground contact—i.e., the last two terminals are reversed relative to the standard plug.
Because a user may connect any type of audio plug to the same jack, detection circuitry has been developed to determine which type of audio plug is inserted.
Conventional plug detection is achieved by grounding the tip terminal, injecting a small electrical current first onto the second ring terminal (first detection), and then onto the sleeve terminal (second detection). A three-bit Analog-to-Digital (ADC) circuit measures the voltage on the second ring and sleeve terminals to convert the detected impedance to a digital value. If the impedance of the second ring is equal to the impedance of the sleeve terminal, the plug type is determined to be a 3-pole plug. Otherwise, if the impedance of the second ring is smaller than the sleeve impedance, the plug type is determined to be a 4-pole standard plug, and if the impedance of the second ring is greater than the sleeve impedance, the plug type is a 4-pole OMTP plug.
The inventors hereof have identified a number of problems with the aforementioned technique. For example, the dynamic range of the ADC needs to be wide enough to account for worst case headset resistance and worst case microphone resistance. Also, the Least-Significant-Bit (LSB) size needs to be small enough to account for minimum microphone resistance. For example, a 3-pole headset may be incorrectly detected as 4-pole if headset's resistance falls right at bin boundary of the ADC.